<?php if(!empty($subvo)){
    $v = $subvo;
    $subvo = '';
}
if(!empty($subsubvo)){
    $v = $subsubvo;
    $subsubvo = '';
}
?>
<div class="viewBox myBox<?php echo $v['id'];?>" <?php if($_SESSION[C('USER_AUTH_KEY')]){?> sortID="<?php echo $v['sort'];?>" modulesID="<?php echo $v['id'];?>" title="<?php echo $v['title'];?>" deleteUrl="<?php echo U('/Admin/Modules/delete',array('id'=>$v['id']));?>" settingUrl="<?php echo U('/Admin/Modules/edit',array('id'=>$v['id']));?>" isEdit="0"<?php }?>>
  <?php if(!empty($v['dataname'])){
                $v['content'] = $v['dataname'];
                
        }else{
            $v['content'] = unserialize($v['content']);
        }
         ?>
  
  
  <div class="swiper-container" id="swiper-container<?php echo $v['id'];?>">
    <div class="swiper-wrapper">
      <?php foreach($v['content'] as $key => $p){?>
      <div class="swiper-slide"> <a href="<?php echo $p['link'];?>"><img src="<?php echo getThumbPath($p['img_url']);?>" width="100%" /></a> </div>
      <?php }?>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination<?php echo $v['id'];?> swiper-pagination"></div>
  </div>
  <script>
  
	$(document).ready(function(e) {
		var swipercontainer<?php echo $v['id'];?> = 0;
		$('#swiper-container<?php echo $v['id'];?> img').each(function(index, element) {
            element.onload = function(){
				if($('#swiper-container<?php echo $v['id'];?>').height() < $(this).height()){
					$('#swiper-container<?php echo $v['id'];?>').height($(this).height());
				}
				swipercontainer<?php echo $v['id'];?> ++;
				if($('#swiper-container<?php echo $v['id'];?> img').length >= swipercontainer<?php echo $v['id'];?>){
					var swiper<?php echo $v['id'];?> = new Swiper('#swiper-container<?php echo $v['id'];?>', {
					pagination: '.swiper-pagination',
					<?php if($v['effect'] == 'topLoop'){  echo "direction: 'vertical',";
					
						
					}
					if($v['effect'] == 'fade'){
						echo "effect: 'fade',";
						}
					?>
					pagination : '.swiper-pagination<?php echo $v['id'];?>',
					slidesPerView: <?php echo $v['picDisplayCount'];?>,
					paginationClickable: true,
					spaceBetween: 30,
					autoplay: <?php echo $v['interTime'];?>
				});
				}
			}
        });
		
		
		
		
        
    });
    
    </script> 
</div>
